<template>
  <div>
    <el-descriptions title="维修工单详情" :column="3" border>
      <el-descriptions-item label="报修标题" label-class-name="my-label">
        {{ repairObj.title }}
      </el-descriptions-item>
      <el-descriptions-item label="报修单号">
        {{ repairObj.no }}
      </el-descriptions-item>
      <el-descriptions-item label="报修电话">
        {{ repairObj.applyPhone }}
      </el-descriptions-item>
      <el-descriptions-item label="报修者姓名">
        {{ repairObj.applyName }}
      </el-descriptions-item>
      <el-descriptions-item label="分类">
        <dict-tag :options="dict.type.repair_category" :value="repairObj.applyCategory"/>
      </el-descriptions-item>
      <el-descriptions-item label="报修的内容">
        {{ repairObj.applyContent }}
      </el-descriptions-item>
      <el-descriptions-item label="报修商户编号">
        {{ repairObj.applyHouse }}
      </el-descriptions-item>
      <el-descriptions-item label="报修时间">
        {{ repairObj.applyTime }}
      </el-descriptions-item>
      <el-descriptions-item label="报修图片">
        <image-preview :src="repairObj.applyImg" width="40px" height="40px"></image-preview>
      </el-descriptions-item>
      <el-descriptions-item label="预约时间">
        {{ repairObj.appointmentTime }}
      </el-descriptions-item>
      <el-descriptions-item label="受理说明">
        {{ repairObj.appContent }}
      </el-descriptions-item>
      <el-descriptions-item label="受理时间">
        {{ repairObj.appTime }}
      </el-descriptions-item>
      <el-descriptions-item label="问题确认备注">
        {{ repairObj.confirmContent }}
      </el-descriptions-item>
      <el-descriptions-item label="维修人员姓名">
        {{ repairObj.repairUserName }}
      </el-descriptions-item>
      <el-descriptions-item label="维修材料费用">
        {{ repairObj.repairMaterialsFee }}
      </el-descriptions-item>
      <el-descriptions-item label="维修服务费用">
        {{ repairObj.repairServiceFee }}
      </el-descriptions-item>
      <el-descriptions-item label="修理备注">
        {{ repairObj.repairContent }}
      </el-descriptions-item>
      <el-descriptions-item label="状态">
        <dict-tag :options="dict.type.repair_state" :value="repairObj.repairState"/>
      </el-descriptions-item>
      <el-descriptions-item label="评价结果">
        <dict-tag :options="dict.type.return_result" :value="repairObj.ownerScore"/>
      </el-descriptions-item>
      <el-descriptions-item label="评价内容">
        {{ repairObj.ownerScoreRemark }}
      </el-descriptions-item>
      <el-descriptions-item label="工单结束时间">
        {{ repairObj.endTime }}
      </el-descriptions-item>
      <el-descriptions-item label="总耗时">
        {{ repairObj.timeConsum }} 小时
      </el-descriptions-item>
      <el-descriptions-item label="数据来源">
        <dict-tag :options="dict.type.flow_client" :value="repairObj.client"/>
      </el-descriptions-item>
      <el-descriptions-item label="优先级">
        {{ repairObj.priority }}
      </el-descriptions-item>
      <el-descriptions-item label="回访状态">
        <dict-tag :options="dict.type.return_state" :value="repairObj.returnState"/>
      </el-descriptions-item>
      <el-descriptions-item label="回访结果">
        <dict-tag :options="dict.type.return_result" :value="repairObj.returnResult"/>
      </el-descriptions-item>
      <el-descriptions-item label="回访意见">
        {{ repairObj.returnRemark }}
      </el-descriptions-item>

    </el-descriptions>
  </div>
</template>

<script>
export default {
  name: "repair-detail",
  dicts: ['repair_category', 'return_state', 'flow_client', 'repair_state','return_result'],
  props: {
    repairObj: {
      type: Object,
      default: {}
    }
  }
}
</script>

<style>
.my-label {
  text-align: right;
  background: #E1F3D8;
}
</style>
